package com.example.demo.servlet;

import com.example.demo.dao.BookDao;
import com.example.demo.entity.BookVo;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class Findbook extends HttpServlet {
    BookVo bookVo =new BookVo();
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        try{
            String bookid = request.getParameter("bookid");
            bookVo.setBookid(Integer.valueOf(bookid));
            new BookDao().findBookId(Integer.valueOf(bookid));
            request.getRequestDispatcher("/bookmanage.jsp").forward(request,response);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
